package zifuchuan;

public class Star {
	public static void main(String[] args) {
        String[] strs = { "1", "2", "3", "4", "5", "6", "7", "8", "9",
                          "H", "G", "F", "E", "D", "C", "B", "A"};
        int length = strs.length;
        int halfLength = length / 2;//折半
        int spaceLength = 0;//显示空格键个数
        int showLength = 0;//显示数字个数
        for (int index = 0; index < length; index++) {//index控制位置
            spaceLength = index > halfLength ? index - halfLength : halfLength - index;
            for (int index2 = 1; index2 <= spaceLength; index2++) {
                System.out.print(" "+" ");//一个空格，一个间隙
            }
            
            
            showLength = 2 * (halfLength - spaceLength) + 1;
            for (int index3 = 1; index3 <= showLength; index3++) {
                System.out.print(strs[index]+" ");//一个数字，一个间隙。
            }
            System.out.println();
        }
    } 
}
